﻿namespace Model.Entites
{
    /// <summary>
    /// 回收申请
    /// </summary>
    [SugarTable("T_RecycleReq")]
    public class TRecycleReq : ModelStatusBase
    {
        #region 基础信息

        #region 申请人

        /// <summary>
        /// 申请人
        /// </summary>
        public int CustomerId { get; set; }

        /// <summary>
        /// 申请人
        /// </summary>
        [Navigate(NavigateType.OneToOne, nameof(CustomerId))]
        public TCustomerinfo Customer { get; set; }

        /// <summary>
        /// 联系电话*
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 电子邮箱
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Email { get; set; }

        #endregion 申请人

        #region 回收物品

        /// <summary>
        /// 产品名称*
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 购买时间*
        /// </summary>
        public DateTime BuyTime { get; set; }

        ///购买时间
        [SugarColumn(IsIgnore = true)]
        public string BuyTimeStr => BuyTime.ToString("d");

        /// <summary>
        /// 购买价格(美金)*
        /// </summary>
        public decimal BuyPrice { get; set; }

        /// <summary>
        /// 申请描述
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT", IsNullable = true)]
        public string Description { get; set; }

        /// <summary>
        /// 图片
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT", IsNullable = true)]
        public string Picture { get; set; }

        /// <summary>
        /// 附件
        /// </summary>
        [SugarColumn(ColumnDataType = "LONGTEXT", IsNullable = true)]
        public string Attachment { get; set; }

        #endregion 回收物品

        #endregion 基础信息

        /// 回收申请处理
        [SugarColumn(IsIgnore = true)]
        public dynamic RecycleReqHandle { get; set; }

        /// 回收寄送
        [SugarColumn(IsIgnore = true)]
        public TRecycleSend RecycleSend { get; set; }

        /// 回收寄送处理状态
        [SugarColumn(IsIgnore = true)]
        public TRecycleSendHandle RecycleSendHandle { get; set; }

        /// <summary>
        /// 会员名称
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string MemberName { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public DateTime? HandleTime { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string HandleDesc { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string HandlePicture { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string HandleAttachment { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string HandleBy { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public DateTime? SendHandleTime { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string SendHandleDesc { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string SendHandlePicture { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string SendHandleAttachment { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string SendHandleBy { get; set; }

        ///
        [SugarColumn(IsIgnore = true)]
        public string SendHandleCoupon { get; set; }
    }
}